<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //对对象进行解析
        // const obj = {
        //     name:'lisi',
        //     age:12,
        // }
        // function info(obj){
        //     let{name,age = 20} =obj
        //     console.log(`姓名：${name},年龄：${age}`)
        // }
        // info(obj)
        //对数组进行解析
        let arr=[1,2,4,6]
        let[num1,num2,,num3] =arr
        console.log(num1)
        console.log(num3)
        //合并数组
        let arr1 = [1,2]
        let arr2 = [2,3,...arr1]
        let arr3 = [...arr1,...arr2]
        console.log(arr2)
        console.log(arr3)

        
    </script>
</body>
</html>